<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>管理员列表</title>
<link href="html/css/css.css" rel="stylesheet" type="text/css" />
<script Language="JavaScript" src="html/js/functions.js"></script>

<script type="text/javascript">
// <![CDATA[
var listItem;
window.onload = function() {
	listItem = new list_item_onclick('list_item');
	listItem.init();
};

function selectSingle(obj)
{
	var id = listItem.get_input_value();
	
	if(id == 0)
	{
		msg_box('请至少选择一个');
		return false;
	}

	var id_arr = id.split(",");
	var id_num = id_arr.length
	
	if(id_num > 1)
	{
		msg_box('只能选择一个');
		return false;
	}
	
	obj.href += '&UserID=' + id;
	
	return true;
}

function delMany(obj,url)
{
	var id = listItem.get_input_value();
	
	if(id == 0)
	{
		msg_box('请至少选择一条记录');
		return false;
	}
	
	var url = obj.href + '&UserID=' + id;

	msg_box('您确定要删除这几条纪录吗？' , url);
	
	return false;
}

// ]]>
</script>
</head>

<body style="height:auto;overflow-x:hidden">

<div class="top_tool">
<div>
<a href="?c=admin&d=add"><img src="html/images/user_admin.gif" border="0" align="absmiddle" /> 添加</a>
<a href="?c=admin&d=edit"  onclick="return selectSingle(this);"><img src="html/images/pencil.gif" border="0" align="absmiddle" /> 编辑</a>
<a href="?c=admin&d=delete" onclick="return delMany(this);"><img src="html/images/bin_closed.gif" border="0" align="absmiddle" /> 删除</a>
</div>
</div>

<div class="list_intro"> 
	<div class="left">[ <b>管理员列表</b>]</div>
    <div style="clear:both"></div>
</div>

<div class="list_menu">
<span class="checkbox"><input name="id[]" type="checkbox" value="" onclick="listItem.click_all(this);" /></span>
<span class="type">序号</span>
<span class="tilte">用户名</span>
<span class="type">最后登陆时间</span>
<span class="type">最后登陆IP</span>
</div>
<div class="list_item" id="list_item">
  <foreach name="List" key="key" var="var">
    <div>
    <span class="checkbox"><input name="id[]" type="checkbox" value="[$var.UserID]" /></span>
    <span class="type">[$var.UserID]</span>
    <span class="tilte">
    <if $var.State == '1'>
    [$var.UserName]
    <else>
    <s>[$var.UserName]</s> <font color="#FF0000"><strong>已禁用</strong></font>
    </if>
    </span>
    
    <span class="type">
    <if $var.LastLoginDate>
    [@date('Y-m-d',$var.LastLoginDate)]
    <else>
    <font color="#FF0000"><strong>从未登陆</strong></font>
    </if>
    </span>
    <span class="type">
    <if $var.LastLoginIp>
    [$var.LastLoginIp]
    <else>
    <font color="#FF0000"><strong>从未登陆</strong></font>
    </if>
    </span>
    <div style="clear:both; border:none"></div>
    </div>
</foreach>
      
<div class="page">
    记录数:[$ListNum]&nbsp;&nbsp;页次:[$CurrentPage]/[$PageNum]&nbsp;&nbsp;分页:[$PageList]&nbsp;</div>
</div>
</body>
</html>
